<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文本渲染指令</title>
    <!-- 引用vue.js库 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
    <div id="app">
       <div>{{message}}</div>
       <div v-text="message1"></div>
       <div v-html="message2"></div>
    </div>
    <script>
        let vm = new Vue({
            // 根据id获取到容器div
            el:"#app",
            // data表示数据
            data:{
                message:"模板渲染",
                message1:"this is <em>v-text</em>",
                message2:"this is <em>v-html</em>"
            }
        });
    
    </script>
    
</body>
</html>